#include <iostream>
#include <vector>

using namespace std;

void bubble(vector<int>& nums) {
    int n = nums.size();
    for (int i = n - 1; i >= 0; i--) {
        for (int j = 0; j < i; j++) {
            if (nums[j] > nums[j + 1])
                swap(nums[j], nums[j + 1]);
        }
    }
}

int findKthLargest(vector<int>& nums, int k) {
    bubble(nums);
    return nums[nums.size() - k];
}